// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import Vue from 'vue'
import App from './App'
import store from './store'
import router from './router'

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }

  next()
})

Vue.config.productionTip = false

import axios from 'axios'

Vue.prototype.axios = axios

import WeVue from 'we-vue'
// import 'we-vue/lib/style.css'
Vue.use(WeVue)

//全局变量
import base from './base'
Vue.use(base);

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
